package com.jumper.study.admin.dto.resp;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;

public class StudentLessonResp {
    private Long id;

    private Long accountId;

    private String studentName;

    private Long lessonId;

    private String lessonTitle;

    private LocalDate expireTime;

    private Long adminId;

    private Long studyTimes;

    private LocalDateTime createdAt;

    public StudentLessonResp() {
    }

    public StudentLessonResp(Long id, Long accountId, String studentName, Long lessonId, String lessonTitle,
        LocalDate expireTime, Long adminId, Long studyTimes, LocalDateTime createdAt) {
        this.id = id;
        this.accountId = accountId;
        this.studentName = studentName;
        this.lessonId = lessonId;
        this.lessonTitle = lessonTitle;
        this.expireTime = expireTime;
        this.adminId = adminId;
        this.studyTimes = studyTimes;
        this.createdAt = createdAt;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public Long getLessonId() {
        return lessonId;
    }

    public void setLessonId(Long lessonId) {
        this.lessonId = lessonId;
    }

    public String getLessonTitle() {
        return lessonTitle;
    }

    public void setLessonTitle(String lessonTitle) {
        this.lessonTitle = lessonTitle;
    }

    public String getExpireTime() {
        return expireTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
    }

    public void setExpireTime(LocalDate expireTime) {
        this.expireTime = expireTime;
    }

    public Long getAdminId() {
        return adminId;
    }

    public void setAdminId(Long adminId) {
        this.adminId = adminId;
    }

    public Long getStudyTimes() {
        return studyTimes;
    }

    public void setStudyTimes(Long studyTimes) {
        this.studyTimes = studyTimes;
    }

    public Long getCreatedAt() {
        return createdAt.toEpochSecond(ZoneOffset.UTC);
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
}
